/**
 * options过滤器
 * @param options 
 * @param
 * @returns 
 */
export const filterOptions = (options, filter) => {
    if (filter) {
      options = options.filter(row => {
        if (filter instanceof Function) {
          return filter(row)
        }
        for (let key in filter) {
          if (row[key] !== filter[key]) {
            return false
          }
        }
        return true
      })
    }
    return options
  }
  